package com.bwhx.eruler.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.bwhx.eruler.bean.Version;
import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.dao.VersionDao;

/**
 * @Description:
 */
@Repository
public class VersionDaoImpl extends BaseDaoImpl<Version> implements VersionDao {
	public VersionDaoImpl() {
		this.setNs("com.bwhx.eruler.mapper.VersionMapper.");
	}


	public List<Version> findByName(String vername) {
	
		return getSqlSession().selectList("com.bwhx.eruler.mapper.VersionMapper." + "findByName", vername);
	}


	

	@Override
	public void inputVersion(Version d) {
		this.getSqlSession().update("com.bwhx.eruler.mapper.VersionMapper." + "updateruler", d);
		
		
	}

	@Override
	public List<Version> list(Page p) {
		return getSqlSession().selectList("com.bwhx.eruler.mapper.VersionMapper." + "list",p);

	}


	@Override
	public Integer count(Version d) {
		Object selectOne = getSqlSession().selectOne("com.bwhx.eruler.mapper.VersionMapper." + "count",d);
		if(null!=selectOne && selectOne instanceof Integer){
			return (int)selectOne;
		}
		return 0;
	}


	@Override
	public List<Version> verListAll() {
		return getSqlSession().selectList("com.bwhx.eruler.mapper.VersionMapper." + "listAll");

	}


	
}
